¬ ghostHPDJ v0.2 by Steve Ludtke (steve@ion.rice.edu or stevel@alumni.caltech.edu)

This document will allow you to set up a NeXTStep printer that will print on your HP Deskjet printer. 

This part of the instructions assumes you have already successfully installed ghostscript v2.61 on your computer with the modified gdevcdj.c driver in place. It also assumes the following:

'gs', the ghostscript executable is located in /usr/local/bin

'pp0cat' is located in /usr/local/bin

a directory called '/usr/local/lib/ghostscript/filt' exists

If any of the above files are not where they are supposed to be, either move them, or :
	edit the top of HPColorCorrect/ColorView.m and recompile  AND
	edit gdevcdj.c and recompile ghostscript.

It also assumes that you will be printing on an DJ550C or a DJ560C if you are printing on a 500C or a 520C, you may need to edit the top of HPColorCorrect/ColorView.m and recompile (I have not tested this, please let me know if you have any problems).
----------
(please note, you must be logged in as root to do many of these steps)

The first step is to setup a printer in NetInfo. Since we want the printer to conform in such a way that we can export it via netinfo we will start with a PrintManager based printcap entry, then modify it manually:

1) Run PrintManager and create a new local printer with type 'Unknown' that uses the parallel port. 

2) run NetInfoManager and open the printer you have just created.

3) delete the following properties: cf,df,gf,nf,rf,tf,vf

4) make sure the 'lp' property is set to /dev/null

5) set the 'if' property to : /usr/local/lib/ghostscript/filt/filt.sh

6) add a property to the 'Admin' directory called 'TextPassThrough' and set its value to 'YES'

The printer entry should now be complete.

Next, install HPColorCorrect in /LocalApps (any location is ok). HPColorCorrect creates the filt.sh filter used in printing. Since this is effectively run by whatever user prints, this could potentially be a security hole. To prevent this, 'chown -r' HPColorCorrect.app to some neutral user (not root), then set the suid bit on HPColorCorrect.app/HPColorCorrect (using 'chmod 4555'). Then make sure the neutral user (and nobody else) has write permission in /usr/local/lib/ghostscript/filt, and that 'filt.sh' has been removed from this directory.

Ghostscript does not deal with NeXTStep accent marks correctly. There is a patched version of gs_init.ps included with this package. Copy it to /usr/local/lib/ghostscript. Thanks to Peter Pflaeging for this patch!

Finally, make sure pp0cat is installed in the correct place. 

Note: If you ever need to send a raw file to the Deskjet (from SoftPC, or some other source), just pipe it through pp0cat, or type pp0cat <file>.

Congratulations! You should now be ready to try printing. Be sure to run HPColorCorrect at least once before printing, and press both 'use' buttons. This writes files that the printer driver needs. Changes made by HPColorCorrect stay in effect until they are changed. If you export your new printer on the network, be warned that HPColorCorrect MUST be run on a machine with access to /usr/local/lib/ghostscript/filt.

-----------
What to do if you tried printing and it didn't work:

If something came out of the printer, but the fonts were all messed up:
	1) Did you remember to run the FontMap_extract script?

If something came out of the printer, but it was black and white, not color:
	1) did you print from ImageViewer (does not support color printing) ?

If something came out of the printer, but the colors seemed all messed up, or really dark:
	1) did you use 3 bit color with color correction turned on ?
	2) did you use 32 bit color without color correction ?

If nothing came out of the printer:
	1) See if the following 3 files exist in /usr/local/lib/ghostscript/filt:
		filt.sh, hpccor, hpccor.parm.  
		a) If any of these files don't exist, make sure the permissions on the directory are 
			correct then try running HPColorCorrect again.
		b) If all 3 files are there, try 'filt.sh <tiger.ps' (tiger.ps is a demo from the ghostscript 
			distribution. If you get a tiger on your printer, something is probably wrong
			with your netinfo printer entry, or pp0cat isn't in the right place. The
			permissions on /dev/pp0 could also be wrong.

	2) It still doesn't work:
		a) Run HPColorCorrect and look for error messages on the console.
		b) What year is it? This software was written for v3.2 of NeXTStep. If you're using
			something newer, that may be the problem.
		c) Write me an email message describing the problem. (steve@alumni.caltech.edu)